<%@ page import="entity.Passage" %>
<%@ page import="java.util.List" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
  String course = (String) request.getAttribute("courseName");
  String introduce = (String) request.getAttribute("courseIntroduce");
  String principal = (String) request.getAttribute("coursePrincipal");
  List<Passage> dynamicStates = (List<Passage>) request.getAttribute("dynamic_states");
  List<Passage> links = (List<Passage>) request.getAttribute("links");
  List<Passage> members = (List<Passage>) request.getAttribute("members");
  String bottom_content  = (String) request.getAttribute("bottom_content");
%>
<html>
<head>
  <title><%=course%>精品课程</title>
  <link type="text/css" rel="stylesheet" href="css/common.css"/>
  <link type="text/css" rel="stylesheet" href="css/index.css"/>
  <script type="text/javascript" src="js/common.js"></script>
</head>
<body>

<div id="top">
  <img  src="image/top.png" style="width: 1349px; height: 249px; position: absolute">
  <h1 style="font-size: 30px; color:white; position:absolute;padding-left: 250px; padding-top: 100px; margin: 0"><%=course%>精品课程</h1>

  <form action="SearchAllServlet" method="post" style="position: absolute; padding-left: 764px;padding-top: 174px; margin:0">
    <span style="color: orange">全站搜索</span>
    <input type="text" name="searchAll" id="searchAll" style="width:200px" placeholder="请输入搜索内容" />
    <input onclick="return check() " type="submit" style="background-color: #e8b108; border-color: yellow;border-left: 0;border-right: 0" value="搜索" />
  </form>

  <ul id="nav">
    <li class="sub_nav"><a href="IndexServlet" style="text-decoration: none;color:white">首页</a></li>
    <li class="sub_nav"><a href="FieldServlet?field=11" style="text-decoration: none;color:white">课程介绍</a></li>
    <li class="sub_nav"><a href="FieldServlet?field=21" style="text-decoration: none;color:white">教学团队</a></li>
    <li class="sub_nav"><a href="FieldServlet?field=31" style="text-decoration: none;color:white">课程建设</a></li>
    <li class="sub_nav"><a href="FieldServlet?field=41" style="text-decoration: none;color:white">课程资源</a></li>
    <li class="sub_nav"><a href="FieldServlet?field=61" style="text-decoration: none;color:white">问题与答疑</a></li>
    <li class="sub_nav"><a href="FieldServlet?field=51" style="text-decoration: none;color:white">课程研究</a></li>
    <li class="sub_nav"><a href="MessageServlet?page=1" style="text-decoration: none;color:white">留言板</a></li>
  </ul>

</div>

<div id="content" >
  <div id="introduce">
    <div class="title">
      <img src="image/index/icon.png">
      课程介绍&nbsp;<span style="font-size: 14px;color: gray">Introduce</span>
    </div>
    <hr />
    <p style="font-size:12px; padding-right: 17px">
      &emsp;&emsp;<%=introduce%>
    </p>
  </div>

  <div id="principal">
    <div class="title">
      <img src="image/index/icon.png">
      课程负责人&nbsp;<span style="font-size: 14px;color: gray">Principal</span>
    </div>
    <hr />
    <p style="font-size: 12px;">
      &emsp;&emsp;<%=principal%>
    </p>

  </div>

  <div id="dynamic_state">
    <div class="title2">
      <img src="image/index/icon.png">
      课程动态&nbsp;<span style="font-size: 14px;color: gray">Dynamic State</span>
      <a href="FieldServlet?field=16" style="font-family: 'Adobe Arabic', serif; font-size: 8px;padding-left: 290px;text-decoration: none;color:black;">MORE&nbsp;▶</a>
    </div>
    <div style="padding-left: 9px; padding-right: 15px">
      <hr />
      <%for( int i = 0; i < dynamicStates.size(); i++){%>
      <p style="margin: 0;font-size:13px">
        <span style="color: #fc4b05;font-size: 3px">▶&nbsp;</span>
        <a href="PassageServlet?passageId=<%=dynamicStates.get(i).getPassageId()%>" class="link">
          <%=dynamicStates.get(i).getTitle()%>
        </a>
        <span style="float: right"><%=dynamicStates.get(i).getCreateDate()%></span>
      </p>
      <%}%>
    </div>

  </div>

  <div id="resource">
    <div class="title2">
      <img src="image/index/icon.png">
      教学资源&nbsp;<span style="font-size: 14px;color: gray">Resource</span>
    </div>
    <div style="padding-left: 9px; padding-right: 15px">
      <hr />
      <a href="FieldServlet?field=41"><img class="pic" src="image/index/courseware.png" /></a>
      <a href="FieldServlet?field=42"><img class="pic" src="image/index/video.png" style="margin-left: 16px" /></a>
    </div>
  </div>

  <div id="members">
    <div class="title">
      <img src="image/index/icon.png">
      课程组成员&nbsp;<span style="font-size: 14px;color: gray">Members</span>
    </div>
    <div id="member_box">
          <img src="image/index/page_up.png" style="position: absolute; margin-top: 45px" />
          <div id="photo_box">
              <input type="text" style="display: none;" />
              <%for(int i = 0; i < 6 && i < members.size(); i++) { %>
                <img src="<%=members.get(i).getContent()%>" class="photo" <%if (i == 5){%>style="margin: 0" <%}%> />
              <%}%>
          </div>
          <img src="image/index/page_down.png" style="position: absolute; float: right;margin-top: 45px;margin-left: 21px" />
    </div>

    <img src="image/index/browser.png" style="padding-top: 44px;padding-left: 5px;" />
    <span>
      &nbsp;友情链接：
      <%for(int i = 0; i < links.size(); i++) {%>
        <a href="<%=links.get(i).getContent()%>" style="text-decoration: none"><%=links.get(i).getTitle()%></a>&nbsp;
      <%}%>
    </span>
  </div>

</div>

<div id="bottom">
  <div id="bottom1"></div>
  <div style="height: 2px"></div>
  <div id="bottom2">
    <div>
      <p style="text-align: center; margin: 0; padding: 32px 0 12px 0"><%=bottom_content%></p>
    </div>
  </div>
</div>


</body>
</html>